<template>
	<!-- 学术通讯员申请 -->
	<div id="acadcorres" class="acadcorres">
		<Header></Header>
		<!--本来应该是导航，（方便全局替换）-->
		<!-- <HHeader></HHeader> -->
		<div class="acadcorresContentdvi">
			<div class="meetCont_crumbs">
				<span>
					<router-link :to="{name:'home'}">首页</router-link>
				</span>
				<i class="iconfont icon-youjiantou"></i>
				<span>学术通讯员申请</span>
			</div>
			<div class="meetCont_cluster">
				<div class="meetCont_cluster_let">
					<div class="floorTitle">
						<span>学术通讯员申请</span>
						<i class="iconfont icon-xiegang icon"></i>
						<span>Academic Correspondent</span>
					</div>
					<div class="acadcorrescont">
						<div class="acadcorrescont_equity">
							<p class="acadcorrescont_equity_aa">学术通讯员权益</p>
							<p class="acadcorrescont_equity_bb">
								为更好的推进科研学术知识传播，本刊联合中国新闻文化促进会学术期刊专业委员会、万方医学网共同建立了《医药期刊联盟网》平台，《医药期刊联盟网》平台依托国内100多本核心期刊的权威学术资源和80多万医生注册用户，将为医药领域的学生、医生、基础医学科研人员、药师及其它相关专业人员提供科研学术及临床方面的新理论、新方法、新研究、新动态。诚邀您成为《医药期刊联盟网》平台的学术通讯员。
							</p>
							<p class="acadcorrescont_equity_cc">
								成为《医药期刊联盟网》平台学术通讯员后，将享受以下权益：
								<b>
									<p>1、免费使用知网、万方学术不端查重系统查阅文献；</p>
									<p>2、可免费观看平台上所有内容，包括：文献、视频、课件、直播等；</p>
									<p>3、凡向医药期刊联盟网合作期刊投稿，可进入快审通道，快速审稿，优先出版；</p>
									<p>4、积极、踊跃参与本联盟平台活动的学术通讯员可以获得与本刊权威审稿专家，编委一对一学习交流的机会；有学术期刊专业委员会颁发的学术通讯员荣誉证书。</p>
								</b>
							</p>
							<p class="acadcorrescont_equity_dd">申请成为《医药期刊联盟网》平台学术通讯员，请认真填写下方学术通讯员申请表</p>
						</div>
						<div class="acadcorrescont_equity_table">
							<p>学术通讯员申请表</p>
							<u-form :model="form" label-width='auto' :rules='rules' ref="uForm">

								<div class="acadcorrescont_equity_table_cont">
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="姓名：" prop="RealName" required>
											<u-input v-model="form.RealName" type="text" :border="true"
												placeholder="请输入姓名" />
										</u-form-item>
									</div>

									<div style="display: flex;margin-bottom: 20rpx;">
										<!-- <van-radio-group :value="form.Sex" @change="onChange1"
											style="display: flex;margin-top: 6rpx;margin-left: 20rpx;">
											<van-radio checked-color="#003c80" name="1">男</van-radio>
											<van-radio checked-color="#003c80" name="2">女</van-radio>
										</van-radio-group> -->
										<u-form-item label="性别：" prop="Sex" required>
											<u-radio-group v-model="form.Sex" @change="onChange1">
												<u-radio name="1">
													男
												</u-radio>
												<u-radio name="2">
													女
												</u-radio>
											</u-radio-group>
										</u-form-item>
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="年龄：" prop="Age" required>
											<u-input v-model="form.Age" type="text" :border="true"
												placeholder="请输入年龄" />
										</u-form-item>
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="学历：" prop="Education" required>
											<u-radio-group v-model="form.Education">
												<u-radio name="本科">
													本科
												</u-radio>
												<u-radio name="硕士">
													硕士
												</u-radio>
												<u-radio name="博斯">
													博斯
												</u-radio>
											</u-radio-group>
										</u-form-item>
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="邮箱：" prop="Mailbox" required>
											<!-- <van-field :value="form.Mailbox" @change="yx" placeholder="请输入邮箱" /> -->
											<u-input v-model="form.Mailbox" type="text" :border="true"
												placeholder="请输入邮箱" />
										</u-form-item>
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="电话：" prop="Cell" required>
											<!-- <van-field :value="form.Cell" @change="dh" placeholder="请输入电话" /> -->
											<u-input v-model="form.Cell" type="text" :border="true"
												placeholder="请输入电话" />
										</u-form-item>
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="微信：" prop="Wxcel" required>
											<u-input v-model="form.Wxcel" type="text" :border="true"
												placeholder="请输入微信" />
										</u-form-item>
										<!-- <van-field :value="form.Wxcel" @change="wx" placeholder="请输入微信" /> -->
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="QQ：" prop="Iqel" required>
											<u-input v-model="form.Iqel" type="text" :border="true"
												placeholder="请输入QQ" />
										</u-form-item>
										<!-- <van-field :value="form.Iqel" @change="qq" placeholder="请输入QQ" /> -->
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="单位：" prop="Unit" required>
											<u-input v-model="form.Unit" type="text" :border="true"
												placeholder="请输入单位" />
										</u-form-item>
										<!-- <van-field :value="form.Unit" @change="dw" placeholder="请输入单位" /> -->
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="科室：" prop="Admini" required>
											<u-input v-model="form.Admini" type="text" :border="true"
												placeholder="请输入科室" />
										</u-form-item>
										<!-- <van-field :value="form.Admini" @change="ks" placeholder="请输入科室" /> -->
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="职称：" prop="Techn" required>
											<u-input v-model="form.Techn" type="text" :border="true"
												placeholder="请输入职称" />
										</u-form-item>
										<!-- <van-field :value="form.Techn" @change="zc" placeholder="请输入职称" /> -->
									</div>
									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="学术履历：" prop="Record" required>
											<u-input v-model="form.Record" type="text" :border="true"
												placeholder="请输入学术履历" />
										</u-form-item>
									</div>
									<!-- 	<van-field :value="form.Record" @change="ll" type="textarea" placeholder="请输入履历"
									autosize :border="false" /> -->

									<div style="display: flex;margin-bottom: 20rpx;">
										<u-form-item label="学术成就：" prop="Achieve" required>
											<u-input v-model="form.Achieve" type="text" :border="true"
												placeholder="请输入成就" />
										</u-form-item>
									</div>

									<!-- <van-field :value="form.Achieve" @change="cj" type="textarea" placeholder="请输入成就"
									autosize :border="false" /> -->

									<!-- 
								// 成就
								Achieve: "",
								// 相关活动
								Correl: [] -->
									<view class="" style="margin:30rpx 0;">
										<span style="color:red;">*</span><span style="font-weight: bold;"
											@click="wocao">拟参与平台相关活动（可多选）</span>
									</view>
									<!-- <el-form-item label="拟参与平台相关活动（可多选）" prop="Correl"> -->
									<!-- <u-checkbox-group @change="onChange">
									<span style="color:red;">*</span><span style="font-weight: bold;"
										@click="wocao">拟参与平台相关活动（可多选）</span>
									<u-checkbox label="1" name="1" checked-color="#003c80">
										每月收集1-2条国内外医药领域相关的新理论，新研究，新方法，新动态。</u-checkbox>
									<u-checkbox label="2" name="2" checked-color="#003c80">每个月提供一篇医学的科普文章。
									</u-checkbox>
									<u-checkbox label="3" name="3" checked-color="#003c80">解析优秀论文的行文思路和整体设计方法。
									</u-checkbox>
									<u-checkbox label="4" name="4" checked-color="#003c80">
										负责将国外有权威学术价值的英文文献进行中文翻译。
									</u-checkbox>
									<u-checkbox label="5" name="5" checked-color="#003c80">
										协助医药期刊联盟平台组织、策划、推广相关学术活动，比如：病例擂台大赛，有奖答题，优秀论文评选等。</u-checkbox>
									<u-checkbox label="6" name="6" checked-color="#003c80">
										负责医药期刊联盟平台专家的学术人生内容整理、审核、分类。
									</u-checkbox>
									<u-checkbox label="7" name="7" checked-color="#003c80">
										对医药期刊联盟平台合作学术期刊投稿作者进行有偿学术论文写作指导。</u-checkbox>
									<u-checkbox label="8" name="8" checked-color="#003c80">录制论文写作方法讲座等相关视频和课件。
									</u-checkbox>
								</u-checkbox-group>
 -->
									<u-form-item label="" prop="Achieve" required>
										<u-checkbox-group @change="checkboxGroupChange">
											<u-checkbox v-model="item.checked" v-for="(item, index) in list"
												:key="index" :name="item.name">{{item.label}}
											</u-checkbox>
										</u-checkbox-group>
									</u-form-item>
									<!-- </el-form-item> -->
									<div class="acadcorrescont_equity_table_btn" @click="submitform()">提交</div>
								</div>
							</u-form>
						</div>
					</div>
				</div>
				<div style="clear:both;"></div>
			</div>
		</div>



	</div>
</template>

<script>
	export default {
		name: "acadcorres",
		data() {
			const VALIDATE_MOBILE_NO = (rule, value, callback) => {
				if (util.isNotEmpty(value) && !validate.validateMobile(value)) {
					callback(new Error("手机号需为11位数字"));
				} else {
					callback();
				}
			};

			// 校验密码
			// const VALIDATE_MOBILE_DDT = (rule, value, callback) => {
			//   if (util.isNotEmpty(value) && !validate.validatePassword(value)) {
			//     console.log(value)
			//     callback(new Error("密码需包含字母与数字"));
			//   } else {
			//     callback();
			//   }
			// };

			// 数字类型 validateInteger
			const VALIDATE_MOBILE_AGE = (rule, value, callback) => {
				if (util.isNotEmpty(value) && !validate.validateInteger(value)) {
					callback(new Error("所填内容需为整数"));
				} else {
					callback();
				}
			};

			const VALIDATE_EMAIL = (rule, value, callback) => {
				if (util.isNotEmpty(value) && !validate.validateEmail(value)) {
					callback(new Error("Email需合法"));
				} else {
					callback();
				}
			};

			return {
				rules: {
					RealName: [{
						required: true,
						message: '请输入姓名',
						trigger: ['blur', 'change']
					}],
					Sex: [{
						required: true,
						message: '请选择性别',
						trigger: ['blur', 'change']
					}],
					Age: [{
						required: true,
						message: '请输入年龄',
						trigger: ['blur', 'change']
					}],
					Education: [{
						required: true,
						message: '请输入学历',
						trigger: ['blur', 'change']
					}],
					Mailbox: [{
						required: true,
						message: '请输入邮箱',
						trigger: ['blur', 'change']
					}],
					Cell: [{
						required: true,
						message: '请输入电话',
						trigger: ['blur', 'change']
					}],
					Wxcel: [{
						required: true,
						message: '请输入微信',
						trigger: ['blur', 'change']
					}],
					Iqel: [{
						required: true,
						message: '请输入QQ',
						trigger: ['blur', 'change']
					}],
					Unit: [{
						required: true,
						message: '请输入单位',
						trigger: ['blur', 'change']
					}],
					Admini: [{
						required: true,
						message: '请输入科室',
						trigger: ['blur', 'change']
					}],
					Techn: [{
						required: true,
						message: '请输入职称',
						trigger: ['blur', 'change']
					}],
					Record: [{
						required: true,
						message: '请输入履历',
						trigger: ['blur', 'change']
					}],
					Achieve: [{
						required: true,
						message: '请输入成就',
						trigger: ['blur', 'change']
					}],
					Achieve: [{
						required: true,
						message: '请输入成就',
						trigger: ['blur', 'change']
					}],
					Correl: [{
						required: true,
						message: '请选择相关活动',
						trigger: ['blur', 'change']
					}],
				},
				list: [{
						label: '每月收集1-2条国内外医药领域相关的新理论，新研究，新方法，新动态。',
						name: '1',
						checked: false,
					},
					{
						label: '每个月提供一篇医学的科普文章。',
						name: '2',
						checked: false,
					},
					{
						label: '解析优秀论文的行文思路和整体设计方法。',
						name: '3',
						checked: false,
					},
					{
						label: '负责将国外有权威学术价值的英文文献进行中文翻译。',
						name: '4',
						checked: false,
					},
					{
						label: '协助医药期刊联盟平台组织、策划、推广相关学术活动，比如：病例擂台大赛，有奖答题，优秀论文评选等。',
						name: '5',
						checked: false,
					},
					{
						label: '负责医药期刊联盟平台专家的学术人生内容整理、审核、分类。',
						name: '6',
						checked: false,
					},
					{
						label: '对医药期刊联盟平台合作学术期刊投稿作者进行有偿学术论文写作指导。',
						name: '7',
						checked: false,
					},
					{
						label: '录制论文写作方法讲座等相关视频和课件。',
						name: '8',
						checked: false,
					},

				],
				result: [],
				sex: '1',
				form: {
					// 姓名
					RealName: "",
					// 性别
					Sex: "1",
					// 年龄
					Age: null,
					// 学历
					Education: "",
					// 邮箱
					Mailbox: "",
					// 电话
					Cell: "",
					// 微信
					Wxcel: "",
					// QQ
					Iqel: "",
					// 单位
					Unit: "",
					// 科室
					Admini: "",
					// 职称
					Techn: "",
					// 履历
					Record: "",
					// 成就
					Achieve: "",
					// 相关活动
					Correl: []
				},
				CorrelB: "",
			};
		},
		methods: {
			checkboxGroupChange(e) {
				this.form.Correl = e
			},
			wocao() {
				console.log('我', this.form)
			},
			cj(e) {
				this.form.Achieve = e.detail
			},
			ll(e) {
				this.form.Record = e.detail
			},
			zc(e) {
				this.form.Techn = e.detail
			},
			ks(e) {
				this.form.Admini = e.detail
			},
			dw(e) {
				this.form.Unit = e.detail
			},
			qq(e) {
				this.form.Iqel = e.detail
			},
			wx(e) {
				this.form.Wxcel = e.detail
			},
			dh(e) {
				this.form.Cell = e.detail
			},
			yx(e) {
				this.form.Mailbox = e.detail
			},
			nl(e) {
				this.form.Age = e.detail
			},
			xm(e) {
				this.form.RealName = e.detail
			},
			onChange2(event) {
				this.form.Education = event.mp.detail
			},
			onChange1(event) {
				this.form.Sex = event
			},
			onChange(event) {
				// this.form.Correl = event.mp.detail
				console.log(event)
			},
			submitform() {
				this.$refs.uForm.validate(valid => {
					if (valid) {
						this.CorrelB = this.form.Correl.join(",");
						this.$httphelper
							.post("/api/LmApi/AddBmpadeapplicationform", {
								Name: this.form.RealName,
								Gender: this.form.Sex,
								Age: this.form.Age,
								Education: this.form.Education,
								Mailbox: this.form.Mailbox,
								Phone: this.form.Cell,
								WeChat: this.form.Wxcel,
								QQ: this.form.Iqel,
								Unit: this.form.Unit,
								AdminIstrative: this.form.Admini,
								Professional: this.form.Techn,
								Record: this.form.Record,
								Achievement: this.form.Achieve,
								Choice: this.CorrelB
							})
							.then(res => {
								// if (res.data.code == 200) {
								// 	this.$router.push({
								// 		path: "/acadcorres/acadsucces"
								// 	});
								// }
								uni.showModal({
									title: '提交成功'
								})
							})
							.catch(err => {
								console.log("请求失败：" + "err");
							});
					} else {
						console.log('验证失败');
					}
				});

			}
		},
		onReady() {
			console.log(this.$refs.uForm,'看看')
			this.$refs.uForm.setRules(this.rules);
		}

	};
</script>

<style lang="less" scoped>
	#acadcorres {
		.acadcorresContentdvi {
			width: 2240rpx;
			height: auto;
			margin: 0 auto;

			.meetCont_crumbs {
				width: 2280rpx;
				height: 40rpx;
				margin: 0 auto;
				position: relative;
				margin-top: 56rpx;
				text-align: left;
				line-height: 40rpx;
				padding-left: 20rpx;

				span:nth-child(1) a {
					color: #000000;
					font-size: 32rpx;
					font-weight: bold;
					cursor: pointer;
				}

				i {
					color: #767c82;
					font-size: 36rpx;
					margin-left: 20rpx;
					font-weight: bold;
				}

				span:nth-child(3) {
					color: #003c80;
					font-size: 32rpx;
					margin-left: 20rpx;
					font-weight: bold;
					cursor: pointer;
				}
			}

			.meetCont_cluster {
				width: 100%;
				height: 100%;

				.meetCont_cluster_let {
					width: 100%;
					height: auto;
					position: relative;
					float: left;

					.floorTitle {
						height: 70rpx;
						border-bottom: 4rpx solid #eee;
						position: relative;
						display: flex;

						.icon {
							width: 4rpx;
							height: 40rpx;
							background-color: #003c80;
							margin: 16rpx;
						}

						span:nth-child(1) {
							display: inline-block;
							font-size: 40rpx;
							color: #000;
							width: 290rpx;
							height: 70rpx;
							border-bottom: 4rpx solid #003c80;
							font-family: "Adobe Heiti Std R";
							font-weight: normal;
							line-height: 60rpx;
						}

						span:nth-child(3) {
							color: #797979;
							line-height: 78rpx;
							font-size: 28rpx;
							font-family: "Adobe Heiti Std R";
						}
					}
				}
			}
		}

		.acadcorrescont {
			width: 100%;
			height: auto;
			margin: 0 auto;
			position: relative;
			margin-top: 52rpx;
			border: 2rpx solid #ececec;

			.acadcorrescont_equity {
				width: 92%;
				height: auto;
				border-bottom: 2rpx solid #ececec;
				padding: 30rpx 30rpx 70rpx 30rpx;
				margin: 0 auto;

				.acadcorrescont_equity_aa {
					font-size: 36rpx;
					color: #000;
					text-align: center;
					margin-top: 30rpx;
					font-weight: bold;
				}

				p:nth-child(2),
				p:nth-child(3),
				p:nth-child(4) {
					color: #000;
					font-size: 36rpx;
					text-indent: 2em;
					text-align: justify;
					line-height: 86rpx;
					letter-spacing: 2rpx;
				}

				.acadcorrescont_equity_bb {
					margin-top: 52rpx;
				}

				.acadcorrescont_equity_cc {
					margin-top: 26rpx;
				}

				.acadcorrescont_equity_dd {
					margin-top: 26rpx;
					color: #c00812 !important;
					font-weight: bold;
				}
			}

			.acadcorrescont_equity_table {
				width: 100%;
				height: auto;
				// padding: 30rpx 60rpx 70rpx 60rpx;

				p:nth-child(1) {
					font-size: 36rpx;
					color: #000;
					text-align: center;
					margin-top: 30rpx;
					font-weight: bold;
				}

				.acadcorrescont_equity_table_cont {
					width: 89%;
					height: auto;
					margin: 0 auto;
					margin-top: 60rpx;

					.Sexselect {
						/deep/.el-select {
							width: 74%;

							/deep/.el-input {
								width: 100%;
							}
						}
					}

					/deep/.el-row {
						margin-bottom: 28rpx;
					}

					/deep/.el-input {
						width: 74%;
					}

					/deep/.el-form-item__label {
						font-size: 32rpx;
						padding: 0 2rpx 0 0;
						font-weight: bold;
					}

					.Row_input {
						/deep/.el-input {
							width: 87%;
						}
					}

					.Ler_input {
						/deep/.el-input {
							width: 73%;
						}
					}

					.Text_inp {
						/deep/.el-textarea__inner {
							height: 440rpx;
							margin-top: 20rpx;
						}
					}

					.Co_inp {
						/deep/.el-form-item__label {
							width: 100%;
							text-align: left;
						}

						/deep/.van-checkbox-group {
							margin-top: 80rpx;
						}

						/deep/.van-checkbox {
							display: inherit;
						}

						/deep/.van-checkbox__label {
							padding-left: 24rpx;
							line-height: 72rpx;
							font-size: 32rpx;
						}
					}

					.Iqead {
						/deep/.el-form-item__label {
							margin-left: 26rpx;
						}
					}

					.acadcorrescont_equity_table_btn {
						width: 200rpx;
						height: 70rpx;
						background: #003c80;
						color: #fff;
						margin: 0 auto;
						text-align: center;
						line-height: 70rpx;
						font-size: 34rpx;
						cursor: pointer;
					}
				}
			}
		}
	}

	@media screen and (max-width: 1010px) {
		.meetCont_cluster_right {
			display: none;
		}

		#acadcorres {
			.acadcorresContentdvi {
				width: 100% !important;
				margin-top: 112rpx !important;

				.meetCont_crumbs {
					display: none;
				}

				.meetCont_cluster {
					width: 95%;
					margin: 0 auto;

					.meetCont_cluster_let {
						width: 100% !important;

						.floorTitle {
							width: 100% !important;
							margin-top: 0px !important;
						}

						.acadcorrescont {
							width: 100% !important;
							margin-bottom: 160rpx !important;
						}
					}
				}
			}
		}
	}

	/deep/ .u-checkbox {
		width: 100% !important;
	}
</style>
